import asyncio



async def change_future(f):
    await asyncio.sleep(3)
    f.set_result('改变了future状态')

async def main():
    print("开始")
    loop = asyncio.get_event_loop()
    loop.run_in_executor()
    future = loop.create_future()

    print("调用改变")
    await loop.create_task(change_future(future))

    print("等待 future")
    rs = await future
    print(rs)
    print("结束")

asyncio.run(main())


